import request from '@/utils/request'

// 创建通知公告
export function createAnnouncement(data) {
  return request({
    url: '/bookkeeping/message/createAnnouncement',
    method: 'post',
    data
  })
}

// 删除通知公告
export function deleteAnnouncement(data) {
  return request({
    url: '/bookkeeping/message/deleteAnnouncement',
    method: 'post',
    data
  })
}

// 查询通知公告
export function getAnnouncementCon(id) {
  return request({
    url: '/bookkeeping/message/getAnnouncementCon?id=' + id,
    method: 'get'
  })
}

// 发布通知公告
export function sendAnnouncement(data) {
  return request({
    url: '/bookkeeping/message/sendAnnouncement',
    method: 'post',
    data
  })
}

// 修改通知公告
export function updateAnnouncement(data) {
  return request({
    url: '/bookkeeping/message/updateAnnouncement',
    method: 'post',
    data
  })
}

// 分页查询所有通知公告
export function queryAnnouncementByWorker(data) {
  return request({
    url: '/bookkeeping/message/queryAnnouncementByWorker',
    method: 'post',
    data
  })
}

// 基本信息统计（经营种类/示范等级）
export function basicInfo(data) {
  return request({
    url: '/bookkeeping/statistics/basicInfo',
    method: 'post',
    data
  })
}

// 基本信息统计（经营规模）
export function basicOperatingArea(data) {
  return request({
    url: '/bookkeeping/statistics/basicOperatingArea',
    method: 'post',
    data
  })
}

// 用户查询通知公告
export function queryAnnouncementByUser(data) {
  return request({
    url: '/bookkeeping/message/queryAnnouncementByUser',
    method: 'post',
    data
  })
}

// 新增弱口令
export function addBlackPassword(data) {
  return request({
    url: '/bookkeeping/blackPassword/add',
    method: 'post',
    data
  })
}

// 查询弱口令
export function queryBlackPassword(data) {
  return request({
    url: '/bookkeeping/blackPassword/list',
    method: 'post',
    data
  })
}

// 修改弱口令
export function updateBlackPassword(data) {
  return request({
    url: '/bookkeeping/blackPassword/edit',
    method: 'post',
    data
  })
}

// 删除弱口令
export function deleteBlackPassword(data) {
  return request({
    url: '/bookkeeping/blackPassword/del',
    method: 'post',
    data
  })
}
